package com.ruoyi.a2.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.a2.mapper.AdsStaticInfoMapper;
import com.ruoyi.a2.domain.AdsStaticInfo;
import com.ruoyi.a2.service.IAdsStaticInfoService;

/**
 * ADS-B静态信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-02-20
 */
@Service
public class AdsStaticInfoServiceImpl extends ServiceImpl<AdsStaticInfoMapper, AdsStaticInfo> implements IAdsStaticInfoService
{
    @Autowired
    private AdsStaticInfoMapper adsStaticInfoMapper;

    /**
     * 查询ADS-B静态信息
     *
     * @param id ADS-B静态信息主键
     * @return ADS-B静态信息
     */
    @Override
    public AdsStaticInfo selectAdsStaticInfoById(Long id)
    {
        return adsStaticInfoMapper.selectAdsStaticInfoById(id);
    }

    /**
     * 查询ADS-B静态信息列表
     *
     * @param adsStaticInfo ADS-B静态信息
     * @return ADS-B静态信息
     */
    @Override
    public List<AdsStaticInfo> selectAdsStaticInfoList(AdsStaticInfo adsStaticInfo)
    {
        return adsStaticInfoMapper.selectAdsStaticInfoList(adsStaticInfo);
    }

    /**
     * 新增ADS-B静态信息
     *
     * @param adsStaticInfo ADS-B静态信息
     * @return 结果
     */
    @Override
    public int insertAdsStaticInfo(AdsStaticInfo adsStaticInfo)
    {
        adsStaticInfo.setCreateTime(DateUtils.getNowDate());
        return adsStaticInfoMapper.insertAdsStaticInfo(adsStaticInfo);
    }

    /**
     * 修改ADS-B静态信息
     *
     * @param adsStaticInfo ADS-B静态信息
     * @return 结果
     */
    @Override
    public int updateAdsStaticInfo(AdsStaticInfo adsStaticInfo)
    {
        adsStaticInfo.setUpdateTime(DateUtils.getNowDate());
        return adsStaticInfoMapper.updateAdsStaticInfo(adsStaticInfo);
    }

    /**
     * 批量删除ADS-B静态信息
     *
     * @param ids 需要删除的ADS-B静态信息主键
     * @return 结果
     */
    @Override
    public int deleteAdsStaticInfoByIds(Long[] ids)
    {
        return adsStaticInfoMapper.deleteAdsStaticInfoByIds(ids);
    }

    /**
     * 删除ADS-B静态信息信息
     *
     * @param id ADS-B静态信息主键
     * @return 结果
     */
    @Override
    public int deleteAdsStaticInfoById(Long id)
    {
        return adsStaticInfoMapper.deleteAdsStaticInfoById(id);
    }
}
